<?php

/**
 * relSolicitudAcreditacion form base class.
 *
 * @method relSolicitudAcreditacion getObject() Returns the current form's model object
 *
 * @package    BecArTe
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaserelSolicitudAcreditacionForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'solicitud_id'    => new sfWidgetFormInputHidden(),
      'acreditacion_id' => new sfWidgetFormInputHidden(),
      'created_at'      => new sfWidgetFormDateTime(),
      'updated_at'      => new sfWidgetFormDateTime(),
      'created_by'      => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Creator'), 'add_empty' => true)),
      'updated_by'      => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Updator'), 'add_empty' => true)),
      'version'         => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'solicitud_id'    => new sfValidatorChoice(array('choices' => array($this->getObject()->get('solicitud_id')), 'empty_value' => $this->getObject()->get('solicitud_id'), 'required' => false)),
      'acreditacion_id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('acreditacion_id')), 'empty_value' => $this->getObject()->get('acreditacion_id'), 'required' => false)),
      'created_at'      => new sfValidatorDateTime(),
      'updated_at'      => new sfValidatorDateTime(),
      'created_by'      => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Creator'), 'required' => false)),
      'updated_by'      => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Updator'), 'required' => false)),
      'version'         => new sfValidatorInteger(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('rel_solicitud_acreditacion[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'relSolicitudAcreditacion';
  }

}
